import request from "@/utils/request";

// 获取考勤记录
export function getAttendanceRecords(params: any) {
    return request({
        url: '/api/attendance/records',
        method: 'get',
        params
    });
}

// 删除单条考勤记录
export function deleteAttendanceRecord(id: number) {
    return request({
        url: `/api/attendance/record/${id}`,
        method: 'delete'
    });
}

// 批量删除考勤记录
export function batchDeleteAttendance(ids: number[]) {
    return request({
        url: '/api/attendance/records',
        method: 'delete',
        data: ids
    });
}

// 发送考勤打卡请求
export function recordAttendance(data: any) {
    return request({
        url: '/api/attendance/record',
        method: 'post',
        data
    });
}
